Artisan is "command line interface" using in Laravel. It provides lots of helpful commands for you while developing your application. We can run these command according to our need.
php artisan --version
php artisan list;
php artisan help;
php artisan down;
php artisan up;For creating controller
php artisan make:controller ControllerName ;For creating resource controller (CRUD operation)
php artisan make:controller HomeController--resourceThis controller generate only 5 methods: index(), store(), show(), update(), destroy(). Because create/edit forms are not needed for API
php artisan make:controller HomeController--apiFor creating mail
php artisan make:mail;For creating model
php artisan make:model ModelNameFor creating model with migration
php artisan make:model usermodel -m ;To create a migration
php artisan make:migration MigrationNameTo rollback the migration.
php artisan migrate:rollbackTo create a middleware
php artisan make:middleware MiddelwareName;For create a auth
php artisan make:auth;For create a provider
php artisan make:provider ProviderNameTo create the symbolic link from public/storage to storage/app/public,
php artisan storage:linkFor Generates a new broadcasting channel class.
php artisan make:channel;For Create a new Artisan command
php artisan make:command CommandName ;For Create a new event class
php artisan make:event EventName;For Create a new custom exception class
php artisan make:exception ExceptionName;For Create a new model factory
php artisan make:factoryFor create a job class
php artisan make:jobFor create a job listener
php artisan make:listenerFor create a notification class
php artisan make:notificationFor create a new validation rule
php artisan make:ruleFor Create a new form request class
php artisan make:requestFor create a new seeder class
php artisan make:seeder SeederNameFor create a new test class
php artisan make:testFor create a new Artisan command.
php artisan make:command
php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clearComposer -regenerates the list of all classes that need to be included in the project
composer dump-autoloadSchedule a Command- Runs the scheduled commands defined in the application.
php artisan schedule:runRun a Command Silently - Executes a command without outputting any messages.
php artisan command:name --quietCreate a New Command with Options -Creates a new command with a specified command name.
php artisan make:command CommandName --command=custom:command
We are Recommending you:
- Integrate Zoho SMTP Mail Configurations in Laravel?
- Laravel 8 .htaccess file for php 8
- Laravel 8/7 Overwriting the Default Pagination System
- Custom 404 Page In Laravel 8
- How to create real time sitemap.xml file in Laravel
- Why Use the Repository Pattern in a Laravel Application
- How to change timezone in laravel 8
- How to use soft delete in Laravel?
- Laravel 8 multi auth login
IntroductionGoogle Search Console (GSC) is a...
Master Your Time with the 80/20 Rule: A...
Get Control of Your Time: 6 Easy Ways...
India’s startup space is booming in 2025....
Is Mobile Reels Harming Our Children? Here's...
Zip is a command-line utility tool used for...
Microservices help build big applications by...
WordPress is a beast—powerful, flexible,...
To place INR currency symbol in pdf while...